project(MYAPITEST C)
cmake_minimum_required(VERSION 2.8.8)
#set ( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake_admin )

include(GNUInstallDirs)

find_package (PkgConfig REQUIRED)

pkg_search_module(MYAPI REQUIRED myapi)

MESSAGE(STATUS "myapi lib:" ${MYAPI_LIBRARIES})

add_executable (myapitest myapitest.c)

target_include_directories (myapitest
    PUBLIC
    ${MYAPI_INCLUDE_DIRS}
)
target_link_libraries (myapitest ${MYAPI_LIBRARIES})

install(TARGETS myapitest RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
